<!DOCTYPE HTML>
<html>
<head>
<#include "/adminPage/common.html"/>

</head>
<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">

		<#include "/adminPage/header.html"/>
		<#include "/adminPage/menu.html"/>

		<div class="layui-body">
			<!-- 内容主体区域 -->
			<div style="padding: 15px">
				<fieldset class="layui-elem-field layui-field-title">
					<legend>${menuStr.password}</legend>
				</fieldset>

				<form action="${ctx}/adminPage/password" id="searchForm" method="post">
					<div class="layui-form">
						<div class="layui-inline">
							<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" onclick="add()">${commonStr.add}</button>
						</div>

						<input type="hidden" name="curr" value="${page.curr}"> <input type="hidden" name="limit" value="${page.limit}">
					</div>
				</form>

				<table class="layui-table" lay-size="sm">
					<thead>
						<tr>
							<th>${passwordStr.name}</th>
							<th>${passwordStr.descr}</th>
							<th>${passwordStr.path}</th>
							<th>${commonStr.operation}</th>
						</tr>
					</thead>
					<tbody>
						<#list page.records as password>
						<tr>
							<td>${password.name}</td>
							<td>${password.descr}</td>
							<td>${password.path}</td>
							<td>
								<div class="layui-inline">
								<button type="button" class="layui-btn layui-btn-sm " onclick="edit('${password.id}')">${commonStr.edit}</button>
								</div>
								<div class="layui-inline">
								<button type="button" class="layui-btn layui-btn-danger layui-btn-sm " onclick="del('${password.id}')">${commonStr.del}</button>
								</div>
							</td>
						</tr>
						</#list>
					</tbody>
				</table>
				<div id="pageInfo"></div>
			</div>
		</div>
	</div>

	<div style="height: 0px; width: 0px; overflow: hidden;">
		<!-- 弹出框 -->
		<div class="layui-form" id="windowDiv" style="padding: 15px; display: none">
			<form id="addForm">
				<input type="hidden" name="id" id="id">

				<div class="layui-form-item">
					<label class="layui-form-label">${passwordStr.name}</label>
					<div class="layui-input-block">
						<input type="text" name="name" id="name" class="layui-input">
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">${passwordStr.pass}</label>
					<div class="layui-input-block">
						<input type="password" name="pass" id="pass" class="layui-input">
					</div>
				</div>
				
				<div class="layui-form-item">
					<label class="layui-form-label">${passwordStr.descr}</label>
					<div class="layui-input-block">
						<input type="text" name="descr" id="descr" class="layui-input">
					</div>
				</div>
				

				<div class="layui-form-item center">
					<button type="button" class="layui-btn layui-btn-normal" onclick="addOver()">${commonStr.submit}</button>
					<button type="button" class="layui-btn" onclick="layer.closeAll()">${commonStr.close}</button>
				</div>
			</form>
		</div>


	</div>

	<#include '/adminPage/script.html'/>
	<script src="${ctx}/js/adminPage/password/index.js?v=${jsrandom}" type="text/javascript"></script>
</body>


</html>